<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /**
         *  1. 创建对象
         *  2. 对象属性操作[变量]
         *  3. 对象方法操作[函数]
         * 
         * 
         *  语法：
         *   var 对象 = {
         *      属性名1:属性值1，
         *      属性名2:属性值2，
         *      。。。。
         *      方法名1：方法体1，
         *      方法名2：方法体2
         *   }
         */

        var person1 = {
            name:'卜佳乐',
            age:19,
            sex:'girl',
            sick:function(){
                console.log('我生病了');
            },
            please:function(){
                console.log('请假，多喝热水');
            }
        }
        var person2 = {
            name:'刘沛良',
            age:18,
            sex:'boy',
            sick:function(){
                console.log('我没病');
            },
            please:function(){
                console.log('我想生病，我想喝热水');
            }
        }

        console.log('person1: ', person1,'person2: ', person2);


        var name1 = '卜佳乐';
        var age1 = 19;
        var sex1 = 'girl';
        
        var name2 = '卜佳乐';
        var age2 = 19;
        var sex2 = 'girl';
        
        function sick2(){
            console.log('我生病了');
        }
        function please2(){
            console.log('请假，多喝热水');
        }

        function sick1(){
            console.log('我生病了');
        }
        function please1(){
            console.log('请假，多喝热水');
        }


    </script>
</body>
</html>